import 'package:flutter/material.dart';

import '../compant/Kbutton.dart';
import '../compant/signTextField.dart';
import 'PhotoSetting.dart';

class PhotoPost extends StatefulWidget {
  const PhotoPost({super.key});

  @override
  State<PhotoPost> createState() => _PhotoPostState();
}

class _PhotoPostState extends State<PhotoPost> {
  @override
  Widget build(BuildContext context) {
    Size size = MediaQuery.of(context).size;
    return Scaffold(
      appBar: AppBar(
        elevation: 0,
        shadowColor: Colors.transparent,
        backgroundColor: Colors.white,
        actions: [
          Container(
            margin: EdgeInsets.symmetric(horizontal: 30),
            padding: EdgeInsets.symmetric(vertical: 5, horizontal: 20),
            decoration: BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.circular(20),
                border: Border.all(
                  color: Color(0xffFF876B),
                )),
            child: Text(
              'Next',
              style: TextStyle(
                color: Color(0xffFF876B),
              ),
            ),
          )
        ],
      ),
      body: SingleChildScrollView(
        child: Padding(
          padding: const EdgeInsets.only(left: 15.0, bottom: 50),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              PhotoImg(size: size),
              Container(
                width: size.width - 30,
                height: 140,
                padding: EdgeInsets.symmetric(vertical: 20, horizontal: 20),
                decoration: BoxDecoration(
                  color: Color(0xffFCFCFC),
                  borderRadius: BorderRadius.circular(10),
                  // color: Colors.red,
                ),
                child: Text(
                  'Type your caption',
                  style: TextStyle(color: Color(0xff9B9B9B)),
                ),
              ),
              signTextField(
                text: 'Tags',
              ),
              SizedBox(
                height: 20,
              ),
              signTextField(
                text: 'Location',
              ),
              SizedBox(
                height: 20,
              ),
              signTextField(
                text: 'Select catefory',
              ),
              SizedBox(
                height: 40,
              ),
              Kbutton(
                ontap: () {},
                text: 'Post image',
              )
            ],
          ),
        ),
      ),
    );
  }
}
